# Usage: empire.tcl

if {![info exists eWorkDir]} {set eWorkDir [file dirname [info script]]}

package require DPeye

create {
	outputFile empire.ps 
	mapFile empire.map
	title "empire map"
	creator "Mario Huys (woelpad@gmail.com)"
	$MapDrawingScale 1 $MapUnitScale .35 $MapNameScale .35 $MapSupplyScale .35
	$FrameThickness 6
	images {
		chart {empire.base.ps {scan {0 0 494 532} {} {
				saCoast {caSCoast mexWCoast usaWCoast canWCoast
				canNCoast canECoast usaECoast mexECoast caNCoast ISLAND}
				saInternal caInternal mexInternal usaMexBorder usaWInternal
				usaSEInternal usaNEInternal usaCanBorder canInternal 
				southPacific northPacific arctic atlantic caribbean cuba stLawrence mississippi
			} {
				gm moveto lin lineto 
				OCEAN {Seawater fill} SEA {Lakewater fill} ISLAND {Landcolor fill} LAND {Landcolor fill} 
				BORDER {Nationalborder stroke} internal {Internalborder stroke} external {Seaborder stroke} 
				RIVER {Riverborder stroke} waterconnect {CanalLine stroke} landconnect {LandBridgeLine stroke}
				minx 0 miny 0 maxx 494 maxy 532
			} {}}}
		coordinates {empire.base.ps {scan {} {provinces INFO supplies TLA connections DRAW powers COUNTRY}}}
	}
	borders {
		seas {image {chart Seawater} SeaBlue CoastalBorder}
		islands {image {chart Landcolor} LandBrown CoastalBorder}
		lakes {image {chart Lakewater} SeaBlue CoastalBorder}
		seaBorders {image {chart Seaborder} {} InternalBorder {BorderBlack .3 {3.6 1.2} 1.8}}
		borders {image {chart Internalborder} {} Border {BorderBlack .3}}
		rivers {image {chart Riverborder} {} Border SeaBlue}
		canals {image {chart CanalLine} {} Border {SeaBlue .7 {1 1} 1}}
		landBridges {image {chart LandBridgeLine} {} Border {Black .7 {1 1} 1}}
	}
	locationTypes {
		Supplies {number 0 name 0 draw 1 define -1}
		Territories {number 0 name 1 populate 1 info 1}
	}
	locations {
		supplies {image {coordinates supplies} Supplies s {Blue {} S}}
		coasts {image {coordinates provinces} Territories c {Red DarkGreen AF} {
			ANC YUK NWT NUN MAN VAN NON WON ONT ABI UNG 
			LAB COT QUE MON BEA GAS NSC NEW WAS ORE SFR 
			LAN SDI MIN MIS ARK LOU HOU SAN UPE MIC IND 
			CHI OHI WPE NYS MAI VEM VIR KEN TEN DSO GEO 
			SCA NCA JAC MIA TAM BAJ CHH NLE DUR GUA POT 
			VER TAB YUC PAN ANT GUJ VEN LIM ECU GRE
		}}
		shores {image {coordinates provinces} Territories o {Black Black A} {
			MAS NYC NJE WDC FPA HAV HOL HAI DOM KIN GUE 
			OAX CHP ESA HAW
		}}
		lands {image {coordinates provinces} Territories l {Green DarkGreen A} {
			SAS CGY NBC IDA ARI UTA NEV NME COL WYO MTA 
			DAL OKL KAN NEB DAK IOW WTE PHI WVI COA MEX 
			VIC BOG
		}}
		waters {image {coordinates provinces} Territories w {White White F} {
			LON LMI LSU LHU LER BER {ARO 0 -3} BEF HUB BAB SOL 
			NAO GSL MAB MAO CHB CMA SOS BET ECO SOF ECS 
			LES APB GOM GOC SOY GOH CAT WCS SCS GMO GOA 
			QCS SJF WCO NPO MPO GSC SWP COM GCA GOT SPO 
			GAL GOG GOP COB GOF
		}}
		greens {{coordinates provinces} Territories g {DarkGreen DarkGreen A} {
			NBR MIL GUT HON NIC COS CAL
		}}
		corals {{coordinates provinces} Territories a {Pink Black A} {
			CAM
		}}
		beaches {{coordinates provinces} Territories b {Yellow {} F} {
			NBR/NC NBR/SC MIL/NC MIL/EC CAM/NC CAM/SC 
			GUT/SC GUT/EC HON/NC HON/SC NIC/EC NIC/WC 
			COS/NC COS/SC CAL/NC CAL/SC
		}}
	}
	powers {
		BC {}
		California {{} {} White}
		Cuba {}
		Florida {}
		Heartland {}
		Mexico {}
		NewYork {}
		Peru {}
		Quebec {}
		Texas {}
	}
	frame {{bbox} {} LandBrown FrameBorder}
	layout {corner owners} fontSize 7.5
	orderColumns 2 orderHasHeading 2 retreatHasHeading 3 adjustmentHasHeading 3
	drawLayoutBorder 7 composed 1 printLayout 0 testBorder 0
	addPage 1 pageContents1 {
		"\{"

		"200 40 DrawFleet"
		"200 40 180 140 ArrowPropose"
		"200 40 100 20 ArrowRetreat"
		"200 40 300 60 ArrowMove"
		
		"180 140 DrawArmy"
		"ProposePhase"
		"180 140 160 240 ArrowMove"
		"RetreatPhase"
		"180 140 80 120 ArrowMove"
		"MovePhase"
		"180 140 280 160 ArrowMove"

		"300 90 DrawFleet"
		"300 90 200 40 180 140 ArrowSupport"
		"300 120 DrawArmy"
		"300 120 180 140 ArrowHold"
		"300 150 DrawFleet"
		"300 150 180 140 160 240 ArrowConvoy"

		"\} dup exec -40 200 translate FailedOrder exec OkOrder 40 -200 translate"
				
		"400 200 DrawFleet"
		"400 200 ArrowArrive"
		"400 230 DrawArmy"
		"400 230 ArrowDepart"
		"400 260 DrawFleet"
		"400 260 ArrowRetreatArrive"
		"400 290 DrawArmy"
		"400 290 ArrowRetreatDepart"
		
		"500 200 DrawFleet"
		"500 200 BuildUnit"
		"500 230 DrawArmy"
		"500 230 DestroyUnit"
		"500 260 DrawFleet"
		"500 260 DisbandUnit"
		"500 290 DrawArmy"
		"500 290 RemoveUnit"
		"500 320 DrawFleet"
		"500 320 FindUnit"
		"500 350 DrawArmy"
		"500 350 LoseUnit"
		"500 380 DrawFleet"
		"500 380 QueryUnit"
    }
}
